package com.ocss.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ocss.system.mapper.OcssElectiveCoursesMapper;
import com.ocss.system.domain.OcssElectiveCourses;
import com.ocss.system.service.IOcssElectiveCoursesService;

/**
 * 选课信息Service业务层处理
 *
 * @author ligen
 * @date 2024-03-08
 */
@Service
public class OcssElectiveCoursesServiceImpl implements IOcssElectiveCoursesService {
    @Autowired
    private OcssElectiveCoursesMapper ocssElectiveCoursesMapper;

    /**
     * 查询选课信息
     *
     * @param id 选课信息主键
     * @return 选课信息
     */
    @Override
    public OcssElectiveCourses selectOcssElectiveCoursesById(Long id) {
        return ocssElectiveCoursesMapper.selectOcssElectiveCoursesById(id);
    }

    /**
     * 查询选课信息列表
     *
     * @param ocssElectiveCourses 选课信息
     * @return 选课信息
     */
    @Override
    public List<OcssElectiveCourses> selectOcssElectiveCoursesList(OcssElectiveCourses ocssElectiveCourses) {
        return ocssElectiveCoursesMapper.selectOcssElectiveCoursesList(ocssElectiveCourses);
    }

    /**
     * 新增选课信息
     *
     * @param ocssElectiveCourses 选课信息
     * @return 结果
     */
    @Override
    public int insertOcssElectiveCourses(OcssElectiveCourses ocssElectiveCourses) {
        return ocssElectiveCoursesMapper.insertOcssElectiveCourses(ocssElectiveCourses);
    }

    /**
     * 修改选课信息
     *
     * @param ocssElectiveCourses 选课信息
     * @return 结果
     */
    @Override
    public int updateOcssElectiveCourses(OcssElectiveCourses ocssElectiveCourses) {
        return ocssElectiveCoursesMapper.updateOcssElectiveCourses(ocssElectiveCourses);
    }

    /**
     * 批量删除选课信息
     *
     * @param ids 需要删除的选课信息主键
     * @return 结果
     */
    @Override
    public int deleteOcssElectiveCoursesByIds(Long[] ids) {
        return ocssElectiveCoursesMapper.deleteOcssElectiveCoursesByIds(ids);
    }

    /**
     * 删除选课信息信息
     *
     * @param id 选课信息主键
     * @return 结果
     */
    @Override
    public int deleteOcssElectiveCoursesById(Long id) {
        return ocssElectiveCoursesMapper.deleteOcssElectiveCoursesById(id);
    }
}
